package com.weaver.openapi.service;

import com.weaver.openapi.pojo.architecture.params.*;
import com.weaver.openapi.util.*;
import java.util.*;
import cn.hutool.http.*;
import com.alibaba.fastjson.*;
import com.weaver.openapi.pojo.architecture.res.*;

public class ArchitectureService
{
    public static ArchitectureEmployeeResultVo getEmployeeList(final ArchitectureVo architectureVo, String host, final Map<String, String> headers) {
        host = HostUtil.beforeRequestCheckHeaders(host, headers, "application/json");
        final Map<String, Object> paramMap = new HashMap<String, Object>();
        paramMap.put("access_token", architectureVo.getAccessToken());
        paramMap.put("ids", architectureVo.getIds());
        final String resJson = ((HttpRequest)HttpRequest.post(host + "/api/architecture/v1/external/query/employee/list").body(JSONObject.toJSONString((Object)paramMap)).headerMap((Map)headers, true)).execute().body();
        return (ArchitectureEmployeeResultVo)JSONObject.parseObject(resJson, (Class)ArchitectureEmployeeResultVo.class);
    }
    
    public static ArchitectureLogResultVo queryLinkLog(final ArchitectureVo architectureVo, String host, final Map<String, String> headers) {
        host = HostUtil.beforeRequestCheckHeaders(host, headers, "application/json");
        final Map<String, Object> paramMap = new HashMap<String, Object>();
        paramMap.put("access_token", architectureVo.getAccessToken());
        paramMap.put("wid", architectureVo.getWid());
        paramMap.put("startTime", architectureVo.getStartTime());
        paramMap.put("endTime", architectureVo.getEndTime());
        final String resJson = ((HttpRequest)HttpRequest.post(host + "/api/architecture/v1/external/query/link/log").body(JSONObject.toJSONString((Object)paramMap)).headerMap((Map)headers, true)).execute().body();
        return (ArchitectureLogResultVo)JSONObject.parseObject(resJson, (Class)ArchitectureLogResultVo.class);
    }
    
    public static ArchitectureUrlResultVo getUrlMean(final ArchitectureVo architectureVo, String host, final Map<String, String> headers) {
        host = HostUtil.beforeRequestCheckHeaders(host, headers, "application/json");
        final Map<String, Object> paramMap = new HashMap<String, Object>();
        paramMap.put("access_token", architectureVo.getAccessToken());
        paramMap.put("urlList", architectureVo.getUrlList());
        final String resJson = ((HttpRequest)HttpRequest.post(host + "/api/architecture/v1/external/query/url/meaning").body(JSONObject.toJSONString((Object)paramMap)).headerMap((Map)headers, true)).execute().body();
        return (ArchitectureUrlResultVo)JSONObject.parseObject(resJson, (Class)ArchitectureUrlResultVo.class);
    }
}
